#include <sstream>
//#include "m01_dip_switch.h"
#include "igslib_common_use.h"
#include "dip_switch_dragonball.h"


namespace igslib
{
	IDipSwitchManager* CDipSwitchManager::instance = 0;
	IDipSwitchManager* CDipSwitchManager::GetInstance() 
	{
		if ( instance == 0 )
		{
			instance = new CDipSwitchManager();
		}
		return instance ;
	}
    // IDipSwitch* CDipSwitchManager::NewM01DipSwitch()
    // {
    //     IDipSwitch* rtn = new m01_dip_switch();
    //     cpns.insert(rtn);
    //     return rtn;
    // }
	IDipSwitch* CDipSwitchManager::New_ProjMCU(const std::string& name)
    {
        IDipSwitch* rtn = nullptr;
		if(name == "DragonBallRace")
		{
			rtn = new dipswitch_Grgn();
        }
        
		return rtn;
    }

}

extern "C"{
	igslib::IDipSwitchManager* GetDipSwitchManagerInstance()
	{
		return igslib::CDipSwitchManager::GetInstance();
	}
}
